package com.itheima;

public class Deno {

    public static void main(String[] args) {
        //冒泡排序
        int []arr ={2,4,1,7,3};
    }
    public static void paixu(int[]arr){

        for (int i = 0; i < arr.length-1; i++) {//i排过几个数了
            for (int j = 0; j < arr.length-1-i; j++) {
                if (arr[j]>arr[j+1]){
                    int temp=arr[j];
                    arr[j]=arr[j+1];
                    arr[j+1]=temp;
                }
            }
        }
    }
}
